home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Technical Documentation / MPW 411 / Install411 < prev    next >
Encoding:
Text File  |  1992-02-13  |  2.5 KB  |  101 lines  |  [TEXT/MPS ]

  1. #                                                        3/20/90
  2. #      MPW 3.2 Install411 Script.
  3. #
  4. #    Copyright 1989, Apple Computer, Inc.
  5. #    All Rights Reserved.
  6. #
  7.  
  8. Set Exit 0
  9.  
  10. # Process input parameters.
  11.     
  12.     if "{#}" > 1
  13.         Echo "###Useage {0} [411DestinationVolume]"
  14.         Beep
  15.         Exit 1
  16.     End
  17.     
  18.     Set 411SourceDir `which "{0}"`                          # get pathname of this script
  19.     Set 411SourceDir "`files -q -f "{411SourceDir}"`"    # convert to full pathname
  20.     if "{411SourceDir}"=~/(≈:)®1≈/                        # strip the filename
  21.         Set 411SourceDir "{®1}"
  22.     End
  23.     
  24.     Set 411DestDir ""
  25.     if {#}==1
  26.         Set 411DestDir "{1}"
  27.         if "{411DestDir}"
  28.             if "`Volumes -q "{411DestDir}"`"!~/{411DestDir}/
  29.                 Echo "### 411 destination volume ∂"{411DestDir}∂" not found."
  30.                 Echo "###Useage {0} [411DestinationVolume]"
  31.                 Beep
  32.                 Exit 1
  33.             End
  34.             Set 411DestDir "{411DestDir}"411:
  35.             if not "`Exists -d "{411DestDir}"`"
  36.                 NewFolder "{411DestDir}"
  37.             End
  38.         End
  39.     End
  40.  
  41.  
  42. # Copy the 411 User Startup script into the user's MPW Shell directory.
  43.     
  44.     #disable the old UserStartup script if it exists.
  45.     if "`Exists -f "{ShellDirectory}UserStartup•~_Help_"`"
  46.         Rename "{ShellDirectory}UserStartup•~_Help_" "{ShellDirectory}UserStartup.~_Help_" ≥dev:null
  47.     End
  48.     Duplicate "{411SourceDir}Tools:UserStartup•Help"     "{ShellDirectory}"
  49.  
  50. # Remove old help system files, if they exist.
  51.  
  52.     if "`Exists -d "{ShellDirectory}Help Folder"`"
  53.         Delete  -y "{ShellDirectory}Help Folder"
  54.     end
  55.     
  56. # Copy the 411 tools into the user's MPW Tools directory.
  57.  
  58.     Duplicate -y "{411SourceDir}Tools:Get"             "{MPW}Tools:"
  59.  
  60. # Copy the entire 411 folder from the Source location to the specified destination
  61.  
  62.     if "{411DestDir}"
  63.         Duplicate "{411SourceDir}"≈     "{411DestDir}"
  64.     
  65.         # delete the old 'Help Files' folder if it exists
  66.  
  67.         if "`Exists -d "{411DestDir}Help Files:"`"
  68.             Delete  "{411DestDir}"'Help Files':CIncludesHelp≈
  69.             Delete  "{411DestDir}"'Help Files':PInterfacesHelp≈
  70.             Delete  "{411DestDir}"'Help Files':MPWHelp≈
  71.             Delete  "{411DestDir}"'Help Files':ResourcesHelp≈
  72.             Delete  "{411DestDir}"'Help Files':TechNotesHelp≈
  73.             Delete  "{411DestDir}"'Help Files':InsideMacintoshHelp≈
  74.         
  75.             if "`files "{411DestDir}Help Files:"`"==""
  76.                 Delete -y "{411DestDir}Help Files:"
  77.             End
  78.         End    
  79.  
  80.         # delete the old 'Tools and Scripts' folder if it exists
  81.  
  82.         if "`Exists -d "{411DestDir}Tools and Scripts:"`"
  83.             Delete -y "{411DestDir}Tools and Scripts:"
  84.         End
  85.     End
  86.     
  87.  
  88. # Setup the 411 directory.
  89.  
  90.     Set HelpDirectory "{ShellDirectory}Help Folder:"
  91.         
  92.     if not "`Exists "{HelpDirectory}"`"
  93.         NewFolder "{HelpDirectory}"
  94.     End
  95.     if "{411DestDir}"
  96.         Echo "{411DestDir}"
  97.     Else
  98.         Echo "{411SourceDir}"
  99.     End  >"{HelpDirectory}Help_Folder"
  100.     
  101.